package com.swcn.u_pet;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class LevelControl extends Activity implements OnClickListener {
	Button button1, button2;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.level);
		button1 = (Button) findViewById(R.id.levelup);
		button2 = (Button) findViewById(R.id.leveldown);
		button1.setOnClickListener(this);
		button2.setOnClickListener(this);

	}

	public void onClick(View v) {
		Intent intent = new Intent();  
		if (v == button1) {
			intent.putExtra("Level", 1);
		} else if (v == button2) {
            intent.putExtra("Level", 2);
		}
		setResult(RESULT_OK, intent);  
		finish();
	}
}
